/**
 * 
 * @authors youzhao.zhou@pandauu.com
 * @date    2016-09-05 11:23:28
 * @version $Id$
 * 调试函数
 * 
 * 
 */


;(function(root,factory){

  if(typeof exports === 'object' && typeof module === 'object'){
    
    module.exports = factory(exports);

  } else if (typeof define === 'function' && define.amd) {
    // AMD. Register as an anonymous module.
    define(['exports'], factory);
  } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
    // CommonJS
    factory(exports);
  } else {
    // Browser globals
    root.p_log = factory({});
  }

})((typeof window !== 'undefined' ? window : this) ,function(exports, undefined){

  'use strict';

  function Log(){
    this._logClose = true;
  }
  Log.prototype._log = function (msg) {
    if (typeof console !== 'undefined'&&this._logClose) {
      
      return console && console.error && console.error(msg);
    }
  };
  Log.prototype._logToggle = function (toggle) {
    this._logClose = toggle;
  };
  

  return new Log();

});